home *** CD-ROM | disk | FTP | other *** search
/ PC Open 100 / PC Open 100 CD 1.bin / CD1 / INTERNET / WEBDESIGN / Tsw WebCoder / tswwebcoder5en.exe / {app} / scripts / scriptcode / TSW Demo Scripts / tswblog.tss < prev   
Encoding:
Text File  |  2004-04-22  |  933 b   |  46 lines

  1. {
  2. [Scriptsettings]
  3. Scriptname=Get the latest TSW news
  4. ExecuteOnStartup=0
  5. ExecuteOnlyOnce=0
  6. }
  7. program TSWBlog;
  8.  
  9. procedure FormResize(Sender: TObject);
  10. var
  11.  W: TWebBrowser;
  12.  F: TForm;
  13.  P: TPanel;
  14. begin
  15.  W := GetGlobalVar('BlogBrowser');
  16.  P := GetGlobalVar('BlogPanel');
  17.  W.SetBounds(1, 1, P.Width-1, P.Height-1);
  18. end;
  19.  
  20. var
  21.  W: TWebBrowser;
  22.  F: TForm;
  23.  P: TPanel; 
  24. begin
  25.  F := TForm.Create(nil);
  26.  F.Width := 500;
  27.  F.Height := 350;
  28.  F.Position := poScreenCenter;
  29.  F.Caption := 'TSW Blog';
  30.  P := TPanel.Create(F); 
  31.  P.Parent := F;
  32.  P.Align := alClient;
  33.  P.BevelOuter := bvNone;
  34.  P.Name := 'ThisPanel';
  35.  SetGlobalVar('BlogPanel', P);  
  36.  W := TWebBrowser.Create(P);
  37.  W.ParentWindow := P.Handle;
  38.  W.SetBounds(1, 1, P.Width-1, P.Height-1);
  39.  W.Navigate('http://www.tsware.net/tswblog.php');
  40.  SetGlobalVar('BlogBrowser', W); 
  41.  P.OnResize := 'FormResize';    
  42.  F.ShowModal;
  43.  F.Release;
  44.  W.Free;
  45. end;
  46.